<?php defined('IN_PHPCMS') or exit('No permission resources.'); ?><?php include template("content","header"); ?>
	<div class="main">
		<div class="wrapper bg">
			<div class="pp_nav">
				<div class="txt"></div>
				<div class="logo">
					<ul class="p_pic">
						<li><a href="#"><img src="<?php echo IMG_PATH;?>p_pic.jpg"></a></li>
						<li><a href="#"><img src="<?php echo IMG_PATH;?>p_pic.jpg"></a></li>
						<li><a href="#"><img src="<?php echo IMG_PATH;?>p_pic.jpg"></a></li>
						<li><a href="#"><img src="<?php echo IMG_PATH;?>p_pic.jpg"></a></li>
						<li><a href="#"><img src="<?php echo IMG_PATH;?>p_pic.jpg"></a></li>
						<li><a href="#"><img src="<?php echo IMG_PATH;?>p_pic.jpg"></a></li>
						<li><a href="#"><img src="<?php echo IMG_PATH;?>p_pic.jpg"></a></li>
						<li><a href="#"><img src="<?php echo IMG_PATH;?>p_pic.jpg"></a></li>
						<li><a href="#"><img src="<?php echo IMG_PATH;?>p_pic.jpg"></a></li>
						<li><a href="#"><img src="<?php echo IMG_PATH;?>p_pic.jpg"></a></li>
						<li><a href="#"><img src="<?php echo IMG_PATH;?>p_pic.jpg"></a></li>
						<li><a href="#"><img src="<?php echo IMG_PATH;?>p_pic.jpg"></a></li>
					</ul>
					<ul class="p_txt">
					<?php if(defined('IN_ADMIN')  && !defined('HTML')) {echo "<div class=\"admin_piao\" pc_action=\"content\" data=\"op=content&tag_md5=b43f1459ac702900c8d44c91a5e796dd&action=category&catid=0&num=25&siteid=%24siteid&order=listorder+ASC\"><a href=\"javascript:void(0)\" class=\"admin_piao_edit\">编辑</a>";}$content_tag = pc_base::load_app_class("content_tag", "content");if (method_exists($content_tag, 'category')) {$data = $content_tag->category(array('catid'=>'0','siteid'=>$siteid,'order'=>'listorder ASC','limit'=>'25',));}?>
						<?php $n=1;if(is_array($data)) foreach($data AS $r) { ?>
						<li><a href="<?php echo $r['url'];?>"><?php echo $r['catname'];?></a></li>
						<?php $n++;}unset($n); ?>
					<?php if(defined('IN_ADMIN') && !defined('HTML')) {echo '</div>';}?>
					</ul>
				</div>
			</div>
			<div class="pp_hot">
				<div class="tit"><h2 class="color">热门机型</h2><img src="<?php echo IMG_PATH;?>crow_list.gif"/><span><?php echo $CAT['catname'];?></span></div>
				<div class="box">
					<ul>
					<?php $n=1;if(is_array(subcat($catid,0))) foreach(subcat($catid,0) AS $r) { ?>
						<li>
							<div class="img"><a href="<?php echo $r['url'];?>"><img src="<?php echo thumb($r[image],90,0);?>" title="<?php echo $r['catname'];?>"/></a></div>
							<div class="desc">
								<h3><a href="<?php echo $r['url'];?>"><?php echo $r['catname'];?></a></h3>
								<div class="num">
								<?php if(defined('IN_ADMIN')  && !defined('HTML')) {echo "<div class=\"admin_piao\" pc_action=\"get\" data=\"op=get&tag_md5=a2f874c09cd548e3533c8a5759894936&sql=SELECT+count%281%29+as+roms%2Ccatid+FROM+romzj_download+WHERE+catid+%3D+%24r%5Bcatid%5D&return=data\"><a href=\"javascript:void(0)\" class=\"admin_piao_edit\">编辑</a>";}pc_base::load_sys_class("get_model", "model", 0);$get_db = new get_model();$r = $get_db->sql_query("SELECT count(1) as roms,catid FROM romzj_download WHERE catid = $r[catid] LIMIT 20");while(($s = $get_db->fetch_next()) != false) {$a[] = $s;}$data = $a;unset($a);?>
								<p>ROM ：<span><?php 
                          	if(!empty($data)){
                          		echo $data[0][roms];
                            }else{
                            	echo 0;
                            }
                          ?></span></p>
								<?php if(defined('IN_ADMIN') && !defined('HTML')) {echo '</div>';}?>
								<?php 
                        	$name = $data[0];
                        	if(!empty($name[catid])){
                        ?>
                        <?php if(defined('IN_ADMIN')  && !defined('HTML')) {echo "<div class=\"admin_piao\" pc_action=\"get\" data=\"op=get&tag_md5=9a9fab55ea1b69210689f3409ff7edb8&sql=SELECT+sum%28views%29+as+views+FROM+romzj_hits+WHERE+catid+%3D+%24name%5Bcatid%5D&return=data\"><a href=\"javascript:void(0)\" class=\"admin_piao_edit\">编辑</a>";}pc_base::load_sys_class("get_model", "model", 0);$get_db = new get_model();$r = $get_db->sql_query("SELECT sum(views) as views FROM romzj_hits WHERE catid = $name[catid] LIMIT 20");while(($s = $get_db->fetch_next()) != false) {$a[] = $s;}$data = $a;unset($a);?>
								<p>下载：<span><?php echo $data['0']['views'];?></span></p>
								<?php if(defined('IN_ADMIN') && !defined('HTML')) {echo '</div>';}?>
								<?php }else{?>
                          <p>下载: <span>0</span></p>
                        <?php } ?>
								</div>
							</div>
						</li>
					<?php $n++;}unset($n); ?>
						
						<li>
							<div class="img"><a href="/index.php?m=formguide&c=index&a=show&formid=13&siteid=1"><img src="<?php echo IMG_PATH;?>phone.gif"/></a></div>
							<div class="desc">
								<h3><a href="/index.php?m=formguide&c=index&a=show&formid=13&siteid=1">找不到你想要的机型？<br />
                                                  那告诉我们吧！</a></h3>
							</div>
						</li>
					</ul>
				</div>
				<div class="showMore">
					<a href="#"><img src="<?php echo IMG_PATH;?>more.jpg"/></a>
				</div>
			</div>
		</div>
	</div>
<?php include template("content","footer"); ?>
</body>
</html>
